/***************************************************
//Filename:     ctypeex.c                          //
//Version:	    V1.0			                   //
//Released:		2006-11-03 14:00                   //
//Author:		Hua Weidong                        //
//
//         READ ME
**2006-11-03 14:00
1. Version V1.0 is published

****************************************************/

#include    <ctype.h>

int toint(int c)   /* digit to convert */
{
    if ((c >= '0') && (c <= '9'))	return c - '0';
    else if ((c >= 'A') && (c <= 'F')) return c - 'A' + 10;
    else if ((c >= 'a') && (c <= 'f')) return c - 'a' + 10;
    else return -1;

}
